(*
  Copyright (c) 2009 Barry Schwartz

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation
  files (the "Software"), to deal in the Software without
  restriction, including without limitation the rights to use,
  copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the
  Software is furnished to do so, subject to the following
  conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  OTHER DEALINGS IN THE SOFTWARE.
*)

open Pycaml
open UTypes
  
val read_uc_char : IO.istream -> uc_char
val write_uc_char : IO.ostream -> uc_char -> unit
val to_unicode : int list -> uc_list
val from_unicode : uc_list -> int list
val string_to_bytes : string -> int list
val bytes_to_string : int list -> string
val of_ascii : string -> uc_list
val to_ascii : uc_list -> string
val uc_string_of_ascii : string -> uc_string
val uc_string_to_ascii : uc_string -> string
val of_string : string -> uc_list
val to_string : uc_list -> string
val append : uc_string -> uc_string -> uc_string
val set_string_format : [> | `ASCII | `Latin1 | `UTF8 | `Unicode] -> unit

val uc_char_to_utf8   : uc_char -> string
val uc_string_to_utf8 : uc_string -> string
val utf8_to_uc_string : string -> uc_string

val pythonize_uc_string   : uc_string -> pyobject
val unpythonize_uc_string : pyobject -> uc_string
val glyph_name_to_uc_string : string -> uc_string
